<div class="welfareList">
    <div class="header">
        <h4 class="title">福利列表</h4>
    </div>
    <div class="searchList">
        <form class="form-horizontal" ng-submit="searchWelfareList()">
            <div class="form-group">
                <label for="status" class="col-sm-2 control-label">福利状态</label>
                <div class="col-sm-4">
                    <select class="form-control" id="status" ng-model="search.status">
                        <option value="0">未发布</option>
                        <option value="1">已发布</option>
                        <option value="2">已撤销</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-4">
                    <input type="text" class="form-control" placeholder="请输入优惠券名称..." ng-model="search.name">
                </div>
                <div class="col-sm-2">
                    <button type="submit" class="btn btn-default">查询</button>
                </div>
                <div class="col-sm-1">
                    <a href="" class="btn btn-default" ng-click="welfareCreate()">新建</a>
                </div>
            </div>
        </form>
    </div>
    <section>
        <div class="item" ng-repeat="item in welfareList">
            <div class="background">
                <img ng-src="{{item.img}}" alt="">
                <div class="tr">
                    <!--<span title="评论数"><i class="glyphicon glyphicon-comment"></i><a ui-sref="home.topic.comments({id:item.id})">{{item.participants}}</a></span>-->
                    <span title="浏览量"><i class="glyphicon glyphicon-eye-open"></i><a href="">{{item.browses}}</a></span>
                </div>
            </div>
            <p class="title" title="标题">{{item.name}}</p>
            <!--<div class="intro" title="内容">{{item.useDemo}}</div>-->
            <div class="startDay" title="开始领取时间">开始领取时间:{{item.startDay | date : "yyyy/MM/dd HH:mm:ss"}}</div>
            <div class="endDay" title="截止领取时间">截止领取时间:{{item.endDay | date : "yyyy/MM/dd HH:mm:ss"}}</div>
            <div class="endDay" title="福利类型">福利类型:{{welfareType[item.type]}}</div>
            <div class="op">
                <span class="left">
                    <!--<i class="glyphicon glyphicon-pushpin {{item.top ? '':'un-top'}}"  title="{{item.top ? '取消':''}}置顶" ng-click="updateTop(item)"></i>
                    <span class="{{item.display ? 'green':'red'}}" title="话题状态">{{item.display ? '有效':'无效'}}</span>-->
                    {{item.allCounts - item.useCounts}}/{{item.allCounts}}
                </span>
                <span class="right">
                    <i class="glyphicon" ng-class="{'glyphicon-upload':item.status == 2,'glyphicon-download':item.status == 1}" title="{{item.status == 1?'取消':''}}发布" ng-click="welfarePush(item)"></i>
                    <i class="glyphicon glyphicon-pencil" title="编辑" ng-click="welfareEdit(item)"></i>
                    <i class="glyphicon glyphicon-trash" title="删除" ng-click="welfareDel(item)" ng-if="item.delStatus == 0"></i>
                </span>
            </div>
        </div>
    </section>
</div>